<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入cesiumjs库 -->
    <script src="../lib/cesium/Cesium.js"></script>
    <title>Document</title>
</head>
<style>
    /* 引入cesium widget样式 */
    @import url(../lib/cesium/Widgets/widgets.css);
        html, body, #cesiumContainer {
            width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
        }
</style>
<body>
    <!-- 地图容器 -->
    <div id="cesiumContainer"></div>
    <script src="app.js"></script>
</body>
<script>
    // Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiN2ZlMWExNC04NjRlLTQzMTQtYmI2MS03M2NiN2Q0MjAwYTciLCJpZCI6ODYzNjIsImlhdCI6MTY0Nzc1NjgxNX0.UB9DEHTYlzJ-1N1XF8rH7uGEsw8W5nlMZuz-LTVizb8';
    Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5ZTc1OWUzZS1jN2YyLTRmOTctODkyMS00MDExYTY5ODQyZTYiLCJpZCI6ODYzNjIsImlhdCI6MTY0Nzc1NjY5N30.MQUvoaeFGjbKHPKwCYRzV3TotznfvjGatbZX5UhwOXA";

    try {
       let viewer = new Cesium.Viewer('cesiumContainer', {
            geocoder: false, // 搜地理位置搜索工
            homeButton: false, // 返回首页按钮
            sceneModePicker: false, // 2D 3D切换按钮
            baseLayerPicker: false, // 底图切换按钮
            navigationHelpButton:false, // 帮助按钮
            animation: false, // 左下角动画面板
            timeline: false, // 时间轴
            fullscreenButton: false, // 全屏按钮
            terrain: Cesium.Terrain.fromWorldTerrain(), // 地形
            // terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(
            //     1
            // ),
        });
        // 隐藏logo
    viewer.cesiumWidget.creditContainer.style.display = "none"; 
    } catch (error) {
        
    }
    // 开启深度检测
    // viewer.scene.globe.depthTestAgainstTerrain = true;
</script>
</html>